/* =============================================
   PORTAL AGEN TRAVEL — SAMPURASUN NUSASARI
   Theme: Luxury Gold / Amber Premium
   ============================================= */

/* ── Variables ── */
:root {
  --gold-100: #fff8e7;
  --gold-200: #fdefc3;
  --gold-300: #f9d97a;
  --gold-400: #f0b429;
  --gold-500: #d4941a;
  --gold-600: #b07a10;
  --amber-deep: #7c4a00;
  --amber-dark: #3d2200;
  --bg-base:   #1a0e00;
  --bg-card:   rgba(30, 16, 0, 0.75);
  --border-gold: rgba(212, 148, 26, 0.3);
  --border-gold-bright: rgba(240, 180, 41, 0.6);
  --text-primary: #fdefc3;
  --text-muted: rgba(253, 239, 195, 0.5);
  --shadow-gold: 0 0 40px rgba(212, 148, 26, 0.15);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --radius-card: 20px;
  --radius-input: 12px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background-color: var(--bg-base);
  font-family: var(--font-body);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* ── Background Layers ── */
#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(124, 74, 0, 0.35) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(61, 34, 0, 0.4) 0%, transparent 55%),
              radial-gradient(ellipse at 60% 80%, rgba(180, 100, 0, 0.2) 0%, transparent 50%);
  z-index: 1;
}

.bg-radial-1 {
  position: fixed;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 148, 26, 0.12) 0%, transparent 70%);
  z-index: 1;
  animation: floatOrb1 12s ease-in-out infinite;
}

.bg-radial-2 {
  position: fixed;
  bottom: -150px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 180, 41, 0.1) 0%, transparent 70%);
  z-index: 1;
  animation: floatOrb2 15s ease-in-out infinite;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 148, 26, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 148, 26, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 1;
}

@keyframes floatOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes floatOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, -60px) scale(1.08); }
}

/* ── Back Button ── */
.back-btn {
  position: fixed;
  top: 24px;
  left: 28px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-300);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--border-gold);
  border-radius: 100px;
  background: rgba(30, 16, 0, 0.5);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.back-btn:hover {
  color: var(--gold-400);
  border-color: var(--border-gold-bright);
  background: rgba(212, 148, 26, 0.1);
  transform: translateX(-2px);
}

/* ── Badge Top Right ── */
.badge-travel {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(212, 148, 26, 0.2), rgba(240, 180, 41, 0.1));
  border: 1px solid var(--border-gold-bright);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-300);
  backdrop-filter: blur(10px);
}
.badge-travel i { font-size: 14px; color: var(--gold-400); }

/* ── Main Wrapper ── */
.main-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 90px 20px 40px;
}

/* ── Brand Header ── */
.brand-header {
  text-align: center;
  margin-bottom: 28px;
  animation: fadeDown 0.8s ease both;
}

.brand-logo-wrap {
  margin-bottom: 14px;
}
.brand-logo {
  height: 54px;
  filter: drop-shadow(0 0 16px rgba(212, 148, 26, 0.5));
}

.brand-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 600;
  color: var(--gold-200);
  line-height: 1.15;
  letter-spacing: 0.5px;
  text-shadow: 0 0 30px rgba(212, 148, 26, 0.4);
}
.brand-title em {
  font-style: italic;
  color: var(--gold-400);
  font-weight: 400;
}

.brand-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.subtitle-line {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500));
}
.subtitle-line:last-child {
  background: linear-gradient(90deg, var(--gold-500), transparent);
}

/* ── Form Card ── */
.form-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(212, 148, 26, 0.1);
  padding: 28px 30px 30px;
  animation: fadeUp 0.9s ease 0.1s both;
  position: relative;
  overflow: hidden;
}

/* card shimmer top border */
.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
}

/* ── Tab Switcher ── */
.tab-switcher {
  position: relative;
  display: flex;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 9px;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}
.tab-btn.active {
  color: var(--amber-dark);
  font-weight: 600;
}

.tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  border-radius: 9px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(212, 148, 26, 0.4);
}
.tab-indicator.right {
  transform: translateX(100%);
}

/* ── Alert Box ── */
.alert-box {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  line-height: 1.5;
}
.alert-box.error {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #fca5a5;
}
.alert-box.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

/* ── Auth Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Scrollable daftar form */
.scrollable-form {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 148, 26, 0.3) transparent;
}
.scrollable-form::-webkit-scrollbar {
  width: 4px;
}
.scrollable-form::-webkit-scrollbar-track {
  background: transparent;
}
.scrollable-form::-webkit-scrollbar-thumb {
  background: rgba(212, 148, 26, 0.3);
  border-radius: 10px;
}

/* ── Form Group ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gold-300);
}
.required {
  color: var(--gold-400);
}

/* ── Input Wrap ── */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  color: var(--gold-500);
  font-size: 15px;
  pointer-events: none;
  transition: color 0.3s ease;
  z-index: 2;
}
.input-wrap input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}
.input-wrap input::placeholder {
  color: var(--text-muted);
  font-size: 13px;
}
.input-wrap input:focus {
  border-color: var(--gold-400);
  background: rgba(212, 148, 26, 0.06);
  box-shadow: 0 0 0 3px rgba(212, 148, 26, 0.1), 0 0 20px rgba(212, 148, 26, 0.08);
}
.input-wrap input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
  color: var(--gold-400);
}

/* Toggle password */
.toggle-pw {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  padding: 0;
  transition: color 0.2s;
}
.toggle-pw:hover { color: var(--gold-400); }

/* ── Password Strength ── */
.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.strength-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 10px;
  transition: width 0.4s ease, background 0.4s ease;
}
.strength-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 60px;
  text-align: right;
}

/* ── Forgot Link ── */
.forgot-wrap {
  text-align: right;
  margin-top: -4px;
}
.forgot-link {
  font-size: 12px;
  color: var(--gold-400);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.forgot-link:hover { color: var(--gold-300); text-decoration: underline; }

/* ── Submit Button ── */
.btn-submit {
  margin-top: 4px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-400) 50%, var(--gold-300) 100%);
  color: var(--amber-dark);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius-input);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(212, 148, 26, 0.35);
}
.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-400));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-submit:hover::before { opacity: 1; }
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 148, 26, 0.5);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-text, .btn-icon, .btn-loader { position: relative; z-index: 1; }
.btn-icon { font-size: 16px; }
.spin { animation: spin 0.8s linear infinite; display: inline-block; }

/* ── Switch Hint ── */
.switch-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.switch-hint a {
  color: var(--gold-400);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.switch-hint a:hover { color: var(--gold-300); text-decoration: underline; }

/* ── Footer Note ── */
.footer-note {
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.3px;
}

/* ── Animations ── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 500px) {
  .main-wrapper { padding: 80px 16px 32px; }
  .form-card { padding: 24px 18px 26px; }
  .brand-title { font-size: 1.75rem; }
  .back-btn span { display: none; }
  .badge-travel span { display: none; }
  .scrollable-form { max-height: 380px; }
}